﻿/****************************** Module Header ******************************\
 * Module Name:  tOrderOrder.cs
 * Module Version:  1.0.0 (2013-01-25)
 * Copyright (c) AnyEB.Com (14507247@qq.com)
 * 
 * This source is subject to the GPL License.
 * See http://www.gnu.org/licenses/gpl.html.
 * All other rights reserved.
 * 
 * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 
 * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
\***************************************************************************/

using System;

namespace UCL.Data.ORM.UMD
{
    /// <summary>
    /// 订单-订单管理-订单 数据实体类
    /// </summary>
    [DBTable(Common = "tOrderOrder")]
    public class tOrderOrder
    {
        /// <summary>
        /// 流水号
        /// </summary>
        public string SerialNo { get { return _SerialNo; } set { _SerialNo = value; } }

        [DBColumn(Alias = "流水号", IsKey = true, Length = "32")]
        private string _SerialNo;

        /// <summary>
        /// 订单摘要
        /// </summary>
        public string Summary { get { return _Summary; } set { _Summary = value; } }

        [DBColumn(Alias = "订单摘要", Length = "Max")]
        private string _Summary;

        /// <summary>
        /// 商品数量
        /// </summary>
        public int ItemCount { get { return _ItemCount ?? default(int); } set { _ItemCount = value; } }

        [DBColumn(Alias = "商品数量", DefaultValue = "0")]
        private int? _ItemCount;

        /// <summary>
        /// 商品总额
        /// </summary>
        public decimal ProductAmount { get { return _ProductAmount ?? default(decimal); } set { _ProductAmount = value; } }

        [DBColumn(Alias = "商品总额")]
        private decimal? _ProductAmount;

        /// <summary>
        /// 订单总额(订单总额+配送费用)
        /// </summary>
        public decimal OrderAmount { get { return _OrderAmount ?? default(decimal); } set { _OrderAmount = value; } }

        [DBColumn(Alias = "订单总额", Common = "订单总额+配送费用")]
        private decimal? _OrderAmount;

        /// <summary>
        /// 配送费用
        /// </summary>
        public decimal DeliveryFee { get { return _DeliveryFee ?? default(decimal); } set { _DeliveryFee = value; } }

        [DBColumn(Alias = "配送费用", DefaultValue = "0.00")]
        private decimal? _DeliveryFee;

        /// <summary>
        /// 支付方式编号
        /// </summary>
        public Guid PaymentID { get { return _PaymentID ?? default(Guid); } set { _PaymentID = value; } }

        [DBColumn(Alias = "支付方式编号", CanBeNull = true)]
        private Guid? _PaymentID;

        /// <summary>
        /// 配送方式编号
        /// </summary>
        public Guid LogisticsID { get { return _LogisticsID ?? default(Guid); } set { _LogisticsID = value; } }

        [DBColumn(Alias = "配送方式编号", CanBeNull = true)]
        private Guid? _LogisticsID;

        /// <summary>
        /// 收货人名字
        /// </summary>
        public string ConsigneeName { get { return _ConsigneeName; } set { _ConsigneeName = value; } }

        [DBColumn(Alias = "收货人名字", Length = "32")]
        private string _ConsigneeName;

        /// <summary>
        /// 收货人电话号码
        /// </summary>
        public string ConsigneeTelphone { get { return _ConsigneeTelphone; } set { _ConsigneeTelphone = value; } }

        [DBColumn(Alias = "收货人电话号码", CanBeNull = true, Length = "32")]
        private string _ConsigneeTelphone;

        /// <summary>
        /// 收货人手机号码
        /// </summary>
        public string ConsigneeMobilephone { get { return _ConsigneeMobilephone; } set { _ConsigneeMobilephone = value; } }

        [DBColumn(Alias = "收货人手机号码", CanBeNull = true, Length = "32")]
        private string _ConsigneeMobilephone;

        /// <summary>
        /// 收货人邮件
        /// </summary>
        public string ConsigneeEmail { get { return _ConsigneeEmail; } set { _ConsigneeEmail = value; } }

        [DBColumn(Alias = "收货人邮件", CanBeNull = true, Length = "32")]
        private string _ConsigneeEmail;

        /// <summary>
        /// 收货人地区
        /// </summary>
        public string ConsigneeRegion { get { return _ConsigneeRegion; } set { _ConsigneeRegion = value; } }

        [DBColumn(Alias = "收货人地区", CanBeNull = true, Length = "255")]
        private string _ConsigneeRegion;

        /// <summary>
        /// 收货人地址
        /// </summary>
        public string ConsigneeAddress { get { return _ConsigneeAddress; } set { _ConsigneeAddress = value; } }

        [DBColumn(Alias = "收货人地址", CanBeNull = true, Length = "255")]
        private string _ConsigneeAddress;

        /// <summary>
        /// 收货人邮编
        /// </summary>
        public string ConsigneePostCode { get { return _ConsigneePostCode; } set { _ConsigneePostCode = value; } }

        [DBColumn(Alias = "收货人邮编", CanBeNull = true, Length = "16")]
        private string _ConsigneePostCode;

        /// <summary>
        /// 是否开具发票
        /// </summary>
        public bool IsNeedInvoice { get { return _IsNeedInvoice ?? default(bool); } set { _IsNeedInvoice = value; } }

        [DBColumn(Alias = "是否开具发票", DefaultValue = "0")]
        private bool? _IsNeedInvoice;

        /// <summary>
        /// 发票抬头
        /// </summary>
        public string InvoiceTitle { get { return _InvoiceTitle; } set { _InvoiceTitle = value; } }

        [DBColumn(Alias = "发票抬头", CanBeNull = true, Length = "32")]
        private string _InvoiceTitle;

        /// <summary>
        /// 开票税金
        /// </summary>
        public decimal Tax { get { return _Tax ?? default(decimal); } set { _Tax = value; } }

        [DBColumn(Alias = "开票税金", DefaultValue = "0.00")]
        private decimal? _Tax;

        /// <summary>
        /// 第三方交易流水号
        /// </summary>
        public string EscrowTradeNo { get { return _EscrowTradeNo; } set { _EscrowTradeNo = value; } }

        [DBColumn(Alias = "第三方交易流水号", CanBeNull = true, Length = "32")]
        private string _EscrowTradeNo;

        /// <summary>
        /// 物流发货单号
        /// </summary>
        public string LogisticsTrackingNo { get { return _LogisticsTrackingNo; } set { _LogisticsTrackingNo = value; } }

        [DBColumn(Alias = "物流发货单号", CanBeNull = true, Length = "32")]
        private string _LogisticsTrackingNo;

        /// <summary>
        /// 物流发货时的运输类型，三个值可选：POST(平邮)、EXPRESS(快递)、EMS(EMS)
        /// </summary>
        public string LogisticsTransportType { get { return _LogisticsTransportType; } set { _LogisticsTransportType = value; } }

        [DBColumn(Alias = "物流发货时的运输类型", Common = "三个值可选：POST(平邮)、EXPRESS(快递)、EMS(EMS)", CanBeNull = true, Length = "16")]
        private string _LogisticsTransportType;

        /// <summary>
        /// 物流公司名称
        /// </summary>
        public string LogisticsCompanyName { get { return _LogisticsCompanyName; } set { _LogisticsCompanyName = value; } }

        [DBColumn(Alias = "物流公司名称", CanBeNull = true, Length = "32")]
        private string _LogisticsCompanyName;

        /// <summary>
        /// 物流发货时间
        /// </summary>
        public DateTime LogisticsTime { get { return _LogisticsTime ?? default(DateTime); } set { _LogisticsTime = value; } }

        [DBColumn(Alias = "物流发货时间", CanBeNull = true)]
        private DateTime? _LogisticsTime;

        /// <summary>
        /// 卖家帐号
        /// </summary>
        public string SellerName { get { return _SellerName; } set { _SellerName = value; } }

        [DBColumn(Alias = "卖家帐号", Length = "32")]
        private string _SellerName;

        /// <summary>
        /// 买家帐号
        /// </summary>
        public string BuyerName { get { return _BuyerName; } set { _BuyerName = value; } }

        [DBColumn(Alias = "买家帐号", Length = "32")]
        private string _BuyerName;

        /// <summary>
        /// 管理员帐号
        /// </summary>
        public string AdminName { get { return _AdminName; } set { _AdminName = value; } }

        [DBColumn(Alias = "管理员帐号", CanBeNull = true, Length = "32")]
        private string _AdminName;

        /// <summary>
        /// 买家备注
        /// </summary>
        public string BuyerRemark { get { return _BuyerRemark; } set { _BuyerRemark = value; } }

        [DBColumn(Alias = "买家备注", CanBeNull = true, Length = "255")]
        private string _BuyerRemark;

        /// <summary>
        /// 卖家备注
        /// </summary>
        public string SellerRemark { get { return _SellerRemark; } set { _SellerRemark = value; } }

        [DBColumn(Alias = "卖家备注", CanBeNull = true, Length = "255")]
        private string _SellerRemark;

        /// <summary>
        /// 管理员备注
        /// </summary>
        public string AdminRemark { get { return _AdminRemark; } set { _AdminRemark = value; } }

        [DBColumn(Alias = "管理员备注", CanBeNull = true, Length = "255")]
        private string _AdminRemark;

        /// <summary>
        /// 卖家公司名称
        /// </summary>
        public string SellerCompanyName { get { return _SellerCompanyName; } set { _SellerCompanyName = value; } }

        [DBColumn(Alias = "卖家公司名称", CanBeNull = true, Length = "32")]
        private string _SellerCompanyName;

        /// <summary>
        /// 卖家联系电话
        /// </summary>
        public string SellerTelphone { get { return _SellerTelphone; } set { _SellerTelphone = value; } }

        [DBColumn(Alias = "卖家联系电话", CanBeNull = true, Length = "32")]
        private string _SellerTelphone;

        /// <summary>
        /// 订单来源
        /// </summary>
        public string OrderSource { get { return _OrderSource; } set { _OrderSource = value; } }

        [DBColumn(Alias = "订单来源", CanBeNull = true, Length = "16")]
        private string _OrderSource;

        /// <summary>
        /// 扩展标签
        /// </summary>
        public string ExTags { get { return _ExTags; } set { _ExTags = value; } }

        [DBColumn(Alias = "扩展标签", Length = "16")]
        private string _ExTags;

        /// <summary>
        /// 状态
        /// </summary>
        public short State { get { return _State ?? default(short); } set { _State = value; } }

        [DBColumn(Alias = "状态", DefaultValue = "0")]
        private short? _State;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedTime { get { return _CreatedTime ?? default(DateTime); } set { _CreatedTime = value; } }

        [DBColumn(Alias = "创建时间", DefaultValue = "getdate()")]
        private DateTime? _CreatedTime;

        /// <summary>
        /// 最后更新时间
        /// </summary>
        public DateTime ModifiedDate { get { return _ModifiedDate ?? default(DateTime); } set { _ModifiedDate = value; } }

        [DBColumn(Alias = "最后更新时间", CanBeNull = true)]
        private DateTime? _ModifiedDate;

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDeleted { get { return _IsDeleted ?? default(bool); } set { _IsDeleted = value; } }

        [DBColumn(Alias = "是否删除", DefaultValue = "0")]
        private bool? _IsDeleted;

        /// <summary>
        /// 网站标签
        /// </summary>
        public string SiteTag { get { return _SiteTag; } set { _SiteTag = value; } }

        [DBColumn(Alias = "网站标签", CanBeNull = true, Length = "16")]
        private string _SiteTag;

    }
}
